from wsgiref.simple_server import make_server

def app(environ,response):
    pathinfo = environ['PATH_INFO']
    ss = ""
    if pathinfo == '/a':
        ss = "hello "
    else:
        ss = "good bye"

    response('200 OK', [('Content-Type', 'text/html'),("ccc","dddd")])
    return [ss.encode(),ss.encode()]

httpd = make_server('localhost', 8080, app )

httpd.serve_forever()